package com.molichuxing.services.business.service;

import java.util.List;
import java.util.Map;

import com.molichuxing.framework.dto.Paged;
import com.molichuxing.framework.service.RootService;
import com.molichuxing.services.business.dto.request.create.StoreBizCreateDto;
import com.molichuxing.services.business.dto.request.modify.StoreBizModifyDto;
import com.molichuxing.services.business.dto.response.DealerStoreInfoBizDto;
import com.molichuxing.services.business.dto.response.StoreBaseBizDto;
import com.molichuxing.services.business.dto.response.StoreBizDto;
import com.molichuxing.services.business.dto.response.StoreInfoBizDto;

/**
 * <p>
 * 门店组合 服务类
 * </p>
 *
 * @author
 * @since 2019-08-12
 */
public interface StoreBizService extends RootService {


    /**
     * 获取门店信息分页列表
     *
     * @param map      key:dealerId Integer 经销商id
     *                 key:status Integer 营业状态
     *                 key:verifyStatus Integer 审核状态
     *                 key:shortName String 门店名称
     *                 key：regionId Integer 区域ID
     *                 key:startApplyTime LocalDateTime 申请开始时间
     *                 key:endApplyTime LocalDateTime 申请结束时间
     * @param pageNum
     * @param pageSize
     * @return
     */
    Paged<StoreBizDto> getStorePage(Map<String, Object> map, Integer pageNum, Integer pageSize) throws Exception;

    /**
     * 编辑门店信息
     *
     * @param storeBizModifyDto
     * @return
     * @throws Exception
     */
    Boolean modifyStore(StoreBizModifyDto storeBizModifyDto) throws Exception;

    /**
     * 添加门店
     *
     * @param storeBizCreateDto
     * @return
     * @throws Exception
     */
    Integer createStore(StoreBizCreateDto storeBizCreateDto) throws Exception;

    /**
     * 门店审核
     *
     * @param storeId
     * @param verifyStatus
     * @param rejectReason
     * @param remark
     * @return
     * @throws Exception
     */
    Boolean modifyStoreVerifyStatus(Integer storeId, Integer verifyStatus,
                                    String rejectReason, String remark) throws Exception;

    /**
     * 修改门店状态
     *
     * @param storeId
     * @param status
     * @param statusModifyType
     * @return
     * @throws Exception
     */
    Boolean modifyStoreStatus(Integer storeId, Integer status, Integer statusModifyType) throws Exception;

    /**
     * 门店详情
     *
     * @param storeId
     * @return
     * @throws Exception
     */
    StoreInfoBizDto getStoreInfo(Integer storeId) throws Exception;

    /**
     * 通过门店id获取门店和经销商名称
     *
     * @param storeId
     * @return
     */
    DealerStoreInfoBizDto getDealerStoreInfo(Integer storeId) throws Exception;

    /**
     * 通过门店id获取门店和经销商名称集合
     *
     * @param storeIdList
     * @return
     * @throws Exception
     */
    Map<Integer, DealerStoreInfoBizDto> getDealerStoreInfoMap(List<Integer> storeIdList) throws Exception;

    
    /**
     * 通过门店id获取门店和经销商名称集合
     *
     * @param storeIdList
     * @param status
     * @param notStoreIdList
     * @return
     * @throws Exception
     */
    List<DealerStoreInfoBizDto> getDealerStoreInfoBystoreIdList(List<Integer> storeIdList,Integer status,List<Integer> notStoreIdList) throws Exception;

    /**
     * 通过城市获取门店列表
     *
     * @param map key：regionId Integer 区域ID
     * @return
     */
    public List<StoreInfoBizDto> getStoreInfoList(Map<String, Object> map) throws Exception;

    /**
     * 查询门店基本信息
     *
     * @param cpu 设备cpu号
     * @return
     * @throws Exception
     */
    public StoreBaseBizDto getStoreBaseByCpu(String cpu) throws Exception;

    /**
     * 查询门店基本信息
     *
     * @param storeId 门店id
     * @return
     * @throws Exception
     */
    public StoreBaseBizDto getStoreBaseById(Integer storeId) throws Exception;

    /**
     * 查询门店详情信息
     *
     * @param cpu 设备cpu号
     * @return
     * @throws Exception
     */
    public StoreBizDto getStoreDetailsByCpu(String cpu) throws Exception;

    /**
     * 查询门店详情信息
     *
     * @param storeId 门店id
     * @return
     * @throws Exception
     */
    public StoreBizDto getStoreDetailsById(Integer storeId) throws Exception;

    /**
     * 门店模糊查询
     *
     * @param map key:shortName String 门店名称
     *            key:storeStatus Integer 门店营业状态（null：所有门店，1：门店营业中）
     *            key:dealerId Integer 经销商id
     *            key:dealerStatus Integer 经销商营业状态（null：所有门店，1：经销商营业中）
     *            key:dealerType Integer 经销商类型(null:所有，1:直销，2：分销)
     * @return
     */
    public List<StoreBizDto> getStoreByShortNameFuzzy(Map<String, Object> map) throws Exception;

}
